{include file="public/header" /}
<style>
    h2 {
        text-align: center;
    }
    hr {
        border-top: 20px solid #eee
    }
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content {:config('adminClass.main')}">
    <div class="row">
        <div class="col-sm-12">
            {include file="public/tophead"}
            {include file="public/top" /}
            <div class="ibox-content">
                {include file="public/topsection"}

                <form class="form-horizontal" method="post">
                    {volist name='data' id='m'}
                    <hr >
                    <h4>{$key}</h4>
                    {volist name='m' id='v' key="k"}
                    {switch name="v.channel"}
                    {case value="1"}
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{$v.description}：</label>
                        <div class="col-sm-9">
                            <input type="text" name="{$v.title}" class="form-control" value="{$v.content}">
                            {if condition='$v.remark'}
                            <span class="help-block m-b-none" style="color:rgba(0,0,0,0.4)">{$v.remark}</span>
                            {/if}
                        </div>
                    </div>
                    {/case}
                    {case value="2"}
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{$v.description}：</label>
                        <div></div>
                        <div class="col-sm-9">
                            <div class="radio i-checks">
                                {volist name='$v.default' id='vo'}
                                <label>
                                    <input type="radio" value="{$key}" name="{$v.title}" {eq name='$v.content' value='$key'}checked{/eq}>{$vo}
                                    {if condition='$v.remark'}
                                    <span class="help-block m-b-none" style="color:rgba(0,0,0,0.35)"><i class="fa fa-exclamation-circle" style="margin-right:5px"></i>{$v.remark}</span>
                                    {/if}
                                </label>
                                {/volist}
                            </div>
                        </div>
                    </div>
                    {/case}
                    {case value="3"}
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{$v.description}：</label>
                        <div class="col-sm-9">
                            <textarea type="text" name="{$v.title}" class="form-control" onpropertychange="this.style.height = this.scrollHeight + 'px';" oninput="this.style.height = this.scrollHeight + 'px';">{$v.content}</textarea>
                            {if condition='$v.remark'}
                            <span class="help-block m-b-none" style="color:rgba(0,0,0,0.35)"><i class="fa fa-exclamation-circle" style="margin-right:5px"></i>{$v.remark}</span>
                            {/if}
                        </div>
                    </div>
                    {/case}
                    {case value="4"}
                    <div class="form-group">
                        <label class="col-sm-2 control-label">{$v.description}：</label>
                        <div class="col-sm-9">
                            <div class="input-group">
                                <img src="{present name='v.content'}{if condition='$v.content'}__ROOT__{$v.content}{else /}__IMG__add_img.png{/if}{else /}__IMG__add_img.png{/present}" id="imageimg" style="max-width: 100%;max-height: 600px">
                                <input name="{$v.title}" type="hidden" id="image" class="form-control" value="{$v.content}" >
                                <span class="input-group-btn">
                                    <button type="button" class="btn btn-primary" id="tubiao">上传</button>
                                </span>
                            </div>
                        </div>
                    </div>
                    {/case}
                    {/switch}
                    {if condition='count($m) != $k'}<div class="hr-line-dashed"></div>{/if}
                    {/volist}
                    {/volist}
                </form>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
{load href="__PLUGINS__iCheck/icheck.min.js"}
{load href="__PLUGINS__iCheck/custom.css"}
<script type="text/javascript">
    $(document).ready(function () {
        $(".i-checks").iCheck({
            checkboxClass: "icheckbox_square-green",
            radioClass: "iradio_square-green",
        })
    })

    $.each($("textarea"), function(i, n){
        $(n).css("height", n.scrollHeight + "px");
    })

</script>
{include file="public/bottom" /}
